{% extends "./inc/base.html" %}
{% block style%}
<link rel="stylesheet" href="/static/admin/js/datepicker/bootstrap-datetimepicker.min.css" type="text/css">
{% endblock %}
{% block content %}
<div class="modal-dialog ">
    <form method="post" class="form-horizontal" action="/admin/user/updateps" data-validate="parsley">
    <div class="modal-content">
        <div class="modal-header">

            <h4 class="modal-title">修改用户【{{user.username}}】</h4>
        </div>
        <div class="modal-body">
            <div class="form-group">
                <label class="col-sm-3 control-label">原密码</label>
                <div class="col-sm-9">
                    <div class="row">
                        <div class="col-md-8 ">
                            <input type="password" name="yuanpassword" class="input-sm form-control" data-required="true">
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">新密码</label>
                <div class="col-sm-9">
                    <div class="row">
                        <div class="col-md-8 ">
                            <input type="password" name="password" class="input-sm form-control" data-required="true">
                        </div>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">新密码确认</label>
                <div class="col-sm-9">
                    <div class="row">
                        <div class="col-md-8 ">
                            <input type="password" class="input-sm form-control" placeholder="和新密码保持一致" name="repassword" data-required="true">
                        </div>
                    </div>
                </div>
            </div>

        </div>
        <div class="modal-footer">
            <input type="hidden" value="{{user.id}}" name="id">
            <button class="btn btn-primary btn-s-md ajax-post" type="submit" target-form="form-horizontal">确定</button>
        </div>
    </div><!-- /.modal-content -->
    </form>
</div><!-- /.modal-dialog -->
{% endblock %}
{% block script%}
<script src="/static/admin/js/parsley/parsley.min.js"></script>
{% endblock %}


<!--<script>
    $(function () {

        $('.time').datetimepicker({
            format: 'yyyy-mm-dd hh:ii',
            language:"zh-CN",
            minView:2,
            autoclose:true
        });
        //用户组选择
        $("input[name='is_admin']").on("change",function () {
            var val = $(this).val();
            console.log(val);
            if(val == 1){
                $(".is_admin_group").removeClass('hide');
            }else {
                $(".is_admin_group").addClass('hide');
            }
        })
    })
</script>-->
